package dang.dao;

import dang.dao.impl.BookDaoImpl;
import dang.dao.impl.CategoryDaoImpl;
import dang.dao.impl.OrderDaoImpl;
import dang.dao.impl.UserDaoImpl;

public class DaoFactory {
	public static UserDao getUserDao(){
		return new UserDaoImpl();
	}
	
	public static CategoryDao getCategoryDao(){
		return new CategoryDaoImpl();
	}
	
	public static ProductDao getProductDao(int type){
		//if(type == Constant.TYPE_BOOK)
		//如果查询类型为书，创建BookDAO;如果产品为家电，可创建家电对应DAO
		return new BookDaoImpl();
	}
	
	public static OrderDao getOrderDao(){
		return new OrderDaoImpl();
	}
}
